$(function () {
    var mySwiper = new Swiper('.swiper-container', {
        autoplay: 2000, //可选选项，自动滑动
        loop: true, //可选选项，开启循环
        pagination: '.pagination',
        paginationClickable: true,
        autoplayDisableOnInteraction: false,
        mousewheelControl: true
    });
    var tick;
    $(".arrow-left").click(function(e){
        e.preventDefault();
        mySwiper.swipePrev();
         if(mySwiper.browser.ie8){
             clearInterval(tick);
              tick = setInterval(function () {
               $(".arrow-right").click();
            }, 2000);
        }
    });
    $('.arrow-right').click(function(e){
         e.preventDefault();
        mySwiper.swipeNext();
        if(mySwiper.browser.ie8){
             clearInterval(tick);
              tick = setInterval(function () {
               $(".arrow-right").click();
            }, 2000);
        }
    });
    });

function banner_height(){
    if (window.innerWidth) {
    winWidth = window.innerWidth;
} else if ((document.body) && (document.body.clientWidth))
{
    winWidth = document.body.clientWidth;
}
if (document.documentElement && document.documentElement.clientWidth)
{
    winWidth = document.documentElement.clientWidth;
}       
$(".banner").css({"width":winWidth,"height":winWidth/4.8});
$(".banner .swiper-container").css({"width":winWidth,"height":winWidth/4.8});
$(".banner .swiper-container .swiper-wrapper ").css({"width":winWidth,"height":winWidth/4.8});
$(".banner .swiper-container .swiper-wrapper .swiper-slide").css({"width":winWidth,"height":winWidth/4.8});
}
$(window).resize(function(){
    banner_height();
})    
banner_height();    
    ////热门诊所hover事件
$(".home-clinic ul li").hover(function () {
    $(this).parent().find("li").removeClass("active");
    $(this).addClass("active");
}, function () {
    $(this).removeClass("active");
});
